import React from 'react'
import styles from './index.module.scss'
import { NavBar } from 'antd-mobile'
import { withRouter } from 'react-router-dom'
import classnames from 'classnames'
function MyNavBar({ children, rightContent, className, history }) {
    return (
        <NavBar className={classnames(styles.navBar, className)}
            icon={<i className='iconfont icon-back' />}
            onLeftClick={() => history.goBack()}
            rightContent={rightContent}>
            {children}
        </NavBar>
    )
}
export default withRouter(MyNavBar)
